package com.mz361.stdapi.service;

import com.alibaba.fastjson.JSONObject;
import com.mz361.modules.system.domain.PayOrder;
import com.mz361.stdapi.domain.PayOrderResult;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.security.GeneralSecurityException;

public interface PayOrderResultService {
    /**
     * 获取支付二维码信息
     *
     * @param name
     * @param amunta
     * @param payTpye
     * @param orderType 订单类型：1：标准订单；2 : 套餐订单
     * @return
     */
    PayOrderResult createPayOrder(String userId, String name, Integer amunta, String payTpye, String orderType);

    PayOrderResult refreshPaymentCode(String orderId);

    /**
     * 查询订单支付状态
     *
     * @param orderId
     * @return
     */
    PayOrderResult queryPaymentStatus(String orderId);

    /**
     * 微信支付回调接口
     *
     * @param jsonObject
     * @throws GeneralSecurityException
     * @throws IOException
     */
    PayOrder processWeChatPaymentNotification(JSONObject jsonObject) throws GeneralSecurityException, IOException;

    /**
     * 支付宝支付回调接口
     *
     * @param request
     * @return
     */
    PayOrder processAlipayPaymentNotification(HttpServletRequest request) throws Exception;


}
